﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using UmlDesigner.Model;

namespace UmlDesigner.Gui
{
    public partial class DiagramTreeForm : DockContent
    {
        public DiagramTreeForm()
        {
            InitializeComponent();

            Icon = Properties.Resources.ApplicationIcon;

        }

        private void DiagramTreeForm_Load(object sender, EventArgs e)
        {
            treeView1.ExpandAll();
        }

        internal void Reload()
        {
            treeView1.Nodes["RootNode"].Nodes.Clear();

            foreach (Document doc in Project.Instance.Documents)
            {
                treeView1.Nodes["RootNode"].Nodes.Add(doc.GetHashCode().ToString(), doc.Name);
            }
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {

        }
    }
}
